package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.enumeration.OperationType;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import com.sky.entity.User;

import java.util.Map;

@Mapper
public interface UserMapper {


    @Select("select * from user where openid=#{openid}")
    User getByUserId(String openid);


    @AutoFill(OperationType.INSERT)
    void insert(User user);

    @Select("select * from user where id = #{id}")
    User getById(Long userId);

    Integer sumByMap(Map map);


}
